#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    QFont font;
    font.setPointSize(20);
    ui->label->setFont(font);
    connect(&t, &TimeThread::sendTime, this, &Widget::showTime);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    t.start();
}

void Widget::showTime(QString Time)
{
    ui->label->setText(Time);
}
